execute store result score #maxPower temp run data get entity @s item.components."minecraft:custom_data".guardTowerData.max_power
scoreboard players operation @s Power = #maxPower temp
scoreboard players reset #maxPower temp